$OpenBSD: patch-plugins_vidinput_bsd_vidinput_bsd_cxx,v 1.1 2017/05/07 20:48:29 espie Exp $

Index: plugins/vidinput_bsd/vidinput_bsd.cxx
--- plugins/vidinput_bsd/vidinput_bsd.cxx.orig
+++ plugins/vidinput_bsd/vidinput_bsd.cxx
@@ -31,6 +31,7 @@
 #pragma implementation "vidinput_bsd.h"
 
 #include "vidinput_bsd.h"
+#include <unistd.h>
 
 PCREATE_VIDINPUT_PLUGIN(BSDCAPTURE);
 
@@ -308,7 +309,7 @@ PBoolean PVideoInputDevice_BSDCAPTURE::GetFrameDataNoD
 
     mmap_size = frameBytes;
     videoBuffer = (BYTE *)::mmap(0, mmap_size, PROT_READ, 0, videoFd, 0);
-    if (videoBuffer < 0) {
+    if (videoBuffer != NULL) {
       return false;
     } else {
       canMap = 1;
